var fs = require("fs");
var path=require("path");


var filter= process.argv[3];

fs.readdir("D:\\zqq\\16002090244_node",function(err, list){
   if (err) {
       console.log(err);
   }else{
       console.log(list);
       for (var item of list){
            if(path.extname(item) === '.' + filter){
                console.log(item);
            }
       }
   }
});